'use strict';
module.exports = (sequelize, DataTypes) => {
  const car = sequelize.define('cars', {
    name: {
      type: DataTypes.STRING(50)
    },
    carNumber:{
      type: DataTypes.STRING(80),
      allowNull: false
    },
    carmanagerId: {
      type: DataTypes.INTEGER,
      allowNull: false
    },
    isUse: {
      allowNull: false,
      type: DataTypes.BOOLEAN
    },
    price: {
      allowNull: false,
      type: DataTypes.INTEGER
    },
    carAvater: {
      allowNull: false,
      type: DataTypes.STRING(80)
    },
    createdAt: {
      allowNull: false,
      type: DataTypes.DATE
    },
    updatedAt: {
      allowNull: false,
      type: DataTypes.DATE
    }
  }, {
    tableName: 'cars',
    charset: 'utf8mb4',
    collate: 'utf8mb4_bin'
  });
  car.associate = function(models) {
    // associations can be defined here
  };
  return car;
};